package com.itheima.feiqiu;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.*;

public class SendFeiQiu {

    public static void main(String[] args) throws IOException {
        //创建发送端 对象
        DatagramSocket ds = new DatagramSocket();
        while (true) {
            byte[] bytes =("1:100:小路飞:爸爸是神:32:"+ "小翟翟 你是真的帅哦").getBytes("gbk");
            //组织数据
            DatagramPacket dp = new DatagramPacket(bytes,0,bytes.length, InetAddress.getByName("192.168.17.27"),2425);
            //发送
            ds.send(dp);
        }
        //释放资源
//ds.close();


    }
}
